package repository

import (
	"context"
	"github.com/starmotioncf/soutchatinternal/model"
)

type UserIdRepository interface {
	// GetOne 获取一个可使用的id
	GetOne(ctx context.Context) (uint64, error)
	// TakeOne 使用一个id
	TakeOne(ctx context.Context, uid uint64) error
	// Create 创建一个id
	Create(ctx context.Context, m *model.UserId) error
	// GetLastId 获取当前最大的id
	GetLastId(ctx context.Context) (lastUid uint64, err error)
	// GetAvailableTotal 获取可用id数量
	GetAvailableTotal(ctx context.Context) (total int64, err error)
	// CheckInCustomize 检查id是否在定制id表中
	CheckInCustomize(ctx context.Context, uid uint64) (bool, error)
}
